package bancosys.tec.persist.entities.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import jmine.tec.persist.annotation.Alias;
import bancosys.tec.persist.bussobj.AuthPersistableBusinessObject;
import bancosys.tec.persist.persister.annotation.NaturalKey;
import bancosys.tec.persist.persister.annotation.Unique;

@Entity
@Alias("NLKB")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class NaturalLongKeyBean extends AuthPersistableBusinessObject {

    private Long id;

    private Long longKey;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Unique
    @NaturalKey
    public Long getLongKey() {
        return this.longKey;
    }

    public void setLongKey(Long longKey) {
        this.longKey = longKey;
    }

}
